import ddddocr


def dist_code():
    cor = ddddocr.DdddOcr()
    with open("2.png", mode="rb")as f:
        image_bytes = f.read()
    res = cor.classification(image_bytes)
    return res


def deal_str():  # 处理
    string = '49,73|184,142'
    # 把字符串分成两个坐标
    rs_list = string.rsplit("|")
    for i in rs_list:  # x1,y1
        p_temp = i.split(",")
        x1 = p_temp[0]
        y1 = p_temp[1]
        print('x=', x1, 'y=', y1)
    print("over!")


if __name__ == '__main__':
    deal_str()
